package com.cskaoyan._03otherstream._02print;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/20 15:08
 **/
/*
使用字符打印流 打印数据
 */
public class Demo3 {
    public static void main(String[] args) throws IOException {
        PrintWriter printWriter = new PrintWriter(new FileWriter("a.txt"));

        // print
        printWriter.print(1000);
        printWriter.print(3.14);

        // flush
        printWriter.flush();
        // close
        printWriter.close();
    }
}
